#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# @Project:     uninlu_serv
# @File:        __init__.py
# @Author:      Fan GuiChuan
# @Date:        2025/05/27 10:48
# @Version:     Python3.8
# @Description:
from flask import Flask

from src.utils.u_log import BaseLogManager
from src.app.routes.ner_identify import identify, start_training, get_training_status
logger = BaseLogManager.getLog()


app = Flask(__name__)

logger.debug(f"template folder: {app.template_folder}")


# 定义首页路由
@app.route('/')
def index():
    return 'hello world'

app.add_url_rule('/ner_identify', view_func=identify, methods=['POST'])
app.add_url_rule('/start-training', view_func=start_training, methods=['POST'])
app.add_url_rule('/training-status', view_func=get_training_status, methods=['GET'])



